<?php
function maketime($date)
{
	list($year,$month,$day) = explode("-",$date);
	return mktime(0,0,0,$month,$day,2011);
}

function comment_get($bid_, $max_)
{
 $sql = "SELECT * FROM `comment` WHERE bid = " .$bid_ . " LIMIT 5";
 $reply = $mysql->getData( $sql );
 return json_encode($reply );
}

function myjson($code)
{
$code = json_encode(urlencodeAry($code));
$code = stripcslashes($code);
return urldecode($code);
}
 
function urlencodeAry($data)
{
if(is_array($data))
{
foreach($data as $key=>$val)
{
$data[$key] = urlencodeAry($val);
}
return $data;
}else
{
return urlencode($data);
}
}
?>
